home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / a7221v1b.zip / ADI7221.DOC < prev    next >
Text File  |  1992-03-17  |  24KB  |  564 lines

  1.  
  2.                                 ADI7221
  3.                               Version 1.0b
  4.                          University of Rochester
  5.                           Psychology Department
  6.                               March, 1992
  7.  
  8. Sections in this document:
  9.  
  10.    DISCLAIMER
  11.    TRADEMARKS
  12.    INTRODUCTION
  13.    AUTHENTICITY
  14.    COPYING
  15.    COMPILING
  16.    SYSTEM REQUIREMENTS
  17.    USAGE
  18.    AUTOCAD SETUP
  19.    LINE TYPES
  20.    ERROR AND WARNING MESSAGES
  21.    BUGS
  22.  
  23. ----------------------------------DISCLAIMER---------------------------------
  24.  
  25.    This software is distributed free of charge.  As such, it comes with 
  26.    ABSOLUTELY NO WARRANTY.  The user of the software assumes ALL RISKS 
  27.    associated with its use.
  28.  
  29.    Please read the COPYING section of this document to determine your rights
  30.    to copy and/or modify this software.
  31.  
  32. ----------------------------------TRADEMARKS---------------------------------
  33.  
  34.    IBM is a registered trademark of International Business Machines.
  35.  
  36.    AutoCAD and ADI are registered trademarks of Autodesk, Inc.
  37.  
  38.    Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Corp.
  39.  
  40.    Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
  41.  
  42. ---------------------------------INTRODUCTION--------------------------------
  43.  
  44.    The AutoCAD system provides very limited support for different types of
  45.    printers and plotters. Instead of providing support for a wide variety of
  46.    devices, AutoCAD (versions 2 and above) includes the ability to produce
  47.    device independant plot files.  The files are written in the AutoCAD
  48.    Device Independant (ADI) format.
  49.  
  50.    The ADI7221 program is an AutoCAD ADI file converter that takes an ASCII
  51.    format ADI file and converts it to HP's 7221 plotter language.  The con-
  52.    version produces an output file that can then be sent to the plotter for
  53.    plotting.  Due to the way buffer control and program mode are handled, the
  54.    file must be sent by the SEND7221 program, or some other program that
  55.    understands HP 7221 device control.
  56.  
  57.    Since an ADI format file contains all of the information needed to plot
  58.    any AutoCAD drawing, the ADI7221 program is quite simple to use, and
  59.    actually has no options at all.  All of the setup work that needs to be
  60.    done actually takes place in AutoCAD.  For that reason, a large portion of
  61.    this document actually concerns itself with the procedures used to
  62.    configure AutoCAD to produce a file that can be converted correctly by the
  63.    ADI7221 program.  Please the read the AutoCAD Setup section of this
  64.    docment for more information on this topic.
  65.  
  66. ---------------------------------AUTHENTICITY--------------------------------
  67.    To ensure that your copy of ADI7221 is virus free, it is recommened that          
  68.    you obtain a copy of the VALIDATE program.  This program is free, and is
  69.    part of the McAffee Associates virus protection package (the rest of the
  70.    package is shareware).  McAffee associates can be contacted at
  71.    (408) 988-3832.
  72.  
  73.    The Size reported for ADI7221.EXE and the Hex numbers associated with
  74.    "Check Method 1" and "Check Method 2" should match the output from the
  75.    following run of VALIDATE version 0.3:
  76.  
  77.               File Name:  ADI7221.EXE
  78.                    Size:  15,613
  79.                    Date:  3-16-1992
  80.     File Authentication:
  81.          Check Method 1 - 58FE
  82.          Check Method 2 - 0DA1
  83.  
  84. -----------------------------------COPYING-----------------------------------
  85.  
  86.    You may copy and redistribute this software and its source code in its
  87.    unaltered state, provided that each copy is labeled with the original 
  88.    copyright and disclaimer of warranty notices.  Recipients of distributed
  89.    copies of this software must also be given the rights outlined here.  No
  90.    fee may be charged for copies beyond nominal copying and media costs.
  91.    
  92.    You may modify your copy of the source code, and may distribute the
  93.    modified versions under the following conditions:  
  94.  
  95.       All modified files must be clearly labeled as modified versions, such
  96.       labels must include the authors name, the date, and the nature of all
  97.       changes.
  98.  
  99.       Any program that contains the source code from this software, in whole
  100.       or in part, must be licensed free of charge, under the same conditions
  101.       as those outlined in this document.  The one exception being that you
  102.       can provide a warranty for your program if you choose.
  103.  
  104.       A reasonable attempt must be made to notify the orignal author of this 
  105.       software prior to distribution of modified versions.  Such notification
  106.       should include the nature of all changes made to the software.
  107.       
  108.    The original author can be contacted at any of the following address:
  109.  
  110.         Dave Lutz
  111.         Psychology/Meliora Hall
  112.         Univeristy of Rochester
  113.         Rochester, NY 14627
  114.  
  115.    Electronic mail may be sent to one of the following addresses:
  116.  
  117.         Internet: lutz@psych.rochester.edu
  118.                 or
  119.                   lutz@prodigal.psych.rochester.edu
  120.         BITNET:   lutz@uordbv
  121.  
  122.    Bug reports can also be sent to any of the addresses listed above.
  123.  
  124. ----------------------------------COMPILING----------------------------------
  125.  
  126.   The source code for the ADI 7221 program has been included so that you may
  127.   compile it yourself if you wish.  The code is written in C, and was tested
  128.   using MicroSoft C 5.1.  A Makefile for that compiler has been included in
  129.   the distribution.  If you do not have MSC 5.1, you may have to create your
  130.   own Makefile.
  131.  
  132.   The source code for ADI7221.EXE is meant to be portable among different PC
  133.   compilers, and probably among different CPU types.  However, the source for
  134.   SEND7221.EXE contains code that may be compiler dependant, and is 
  135.   definitely CPU dependant. (sorry folks, serial I/O on a PC is a royal pain)
  136.   For more information on the non-portable code in SEND7221, read
  137.   SEND7221.DOC.
  138.  
  139.   The following discussion assumes that the files in the distribution were
  140.   installed as follows:
  141.  
  142.         /ADI          - .DOC files and precompiled .EXE files
  143.         /ADI/ADI7221  - source for ADI7221.EXE
  144.         /ADI/SEND7221 - source for SEND7221.EXE
  145.  
  146.   It is critical that you DO NOT COMBINE the source code for ADI7221 and
  147.   SEND7221 in the same directory.  The two programs have modules/files by
  148.   the same names that have different contents.
  149.  
  150.   Before you begin compilation, CD to /ADI/ADI7221.  Next, look at the
  151.   definitions in MAKEFILE.MSC and modify them for your local site.
  152.  
  153.   Assuming you have MSC 5.1, you should type "make makefile.msc".  The code
  154.   should compile with no errors, except that you will get the normal "Warning
  155.   target does not exist" message for each module as it is compiled.
  156.  
  157.   As it is currently defined, the makefile will first produce an executable
  158.   called ADI7221.EXE in the ADI7221 directory.  This executable is then
  159.   packed via MicroSoft's EXEPACK command, producing the final ADI7221.EXE
  160.   in /ADI.
  161.  
  162.   Once the final exeutable is in place, you can delete all of the .OBJ files
  163.   and the intermediate ADI7221.EXE file from /ADI/ADI7221.
  164.  
  165. -----------------------------SYSTEM REQUIREMENTS-----------------------------
  166.  
  167.   ADI7221 should run correctly on any IBM compatible PC that has at least
  168.   80k of free memory.
  169.  
  170.   There is no limit to the size of the input or output files (except for
  171.   available disk space), and the memory requirements of the program do not
  172.   change with the size of the input and output files.
  173.  
  174. ------------------------------------USAGE------------------------------------
  175.  
  176.    The command line for the ADI7221 program is quite simple, and consists
  177.    of the following:
  178.  
  179.         ADI7221 infile.plt outfile.hpp
  180.  
  181.    There are no command line options.  The program expects infile.plt to be
  182.    an ascii format, AutoCAD ADI file produced via the AutoCAD "plot"
  183.    function.  ADI7221 produces outfile.hpp, overwriting that file if it
  184.    already exists.  The output file contains the HP 7221 plotter codes that
  185.    are to be sent to the plotter.
  186.  
  187.    In order for ADI7221 to work correctly, AutoCAD must have been set up with
  188.    the correct information for producing the ADI plot file.  For information
  189.    on configuring AutoCAD, consult the AutoCAD Setup section of this
  190.    document.
  191.  
  192.    The file produced by ADI7221 must be sent to the plotter via the SEND7221
  193.    program (or one similar to it).  The MS-DOS print command will not work
  194.    correctly, due to the way buffer control is handled on the HP 7221
  195.    plotter.  The SEND7221 program is described in the file SEND7221.DOC.
  196.  
  197.    Since the ADI7221 and SEND7221 programs will usually be run in sequence,
  198.    a batch file, PLOT7221, has been included in the distribution.  The
  199.    command line for this batch file consists of the following:
  200.  
  201.         PLOT7221 plotname
  202.  
  203.    The plotname parameter should not include a file extension.  PLOT7221
  204.    looks for a file named plotname.PLT, and attempts to convert it to a
  205.    file named plotname.HPP via the ADI7221 program.  If the ADI7221 program
  206.    completes successfully, SEND7221 is then called to send plotname.HPP to
  207.    the plotter.
  208.  
  209.    Command line options for the SEND7221 program can be included on the
  210.    PLOT7221 command line.  These options must follow the plotname
  211.    parameter.  Again, SEND7221 and its options are described in SEND7221.DOC.
  212.  
  213. --------------------------------AUTOCAD SETUP--------------------------------
  214.  
  215.    As mentioned earlier, there are no command line options for the ADI7221
  216.    program.  The reason for this is that all of your options are set by the
  217.    way you configure AutoCAD.  This section describes the AutoCAD configur-
  218.    ation procedure, and defines settings that are critical for the successful
  219.    use of ADI7221.
  220.  
  221.    The description that follows is based on AutoCAD release 10.  If you are
  222.    using a different version of AutoCAD, the specific details of the pro-
  223.    cedure may differ slightly.  However, the important thing to get from this
  224.    section is the values used to reply to various configuration questions.  I
  225.    suspect that the configuration questions will be very similar between
  226.    versions.
  227.  
  228.    There are actually two steps in the confiuration process.  First, you
  229.    define most of the permanent physical characteristics of the plotter,
  230.    then you define pen numbers, line types, and speed settings for each
  231.    of the colors you can use within an AutoCAD drawing.  The first step is
  232.    completed through the configuration menus in AutoCAD, the second step
  233.    is completed when you plot your first drawing.
  234.  
  235.    To begin the configuration process, start AutoCAD in the usual manner.
  236.    You should be able to select "Configure AutoCAD" from the main AutoCAD
  237.    menu.  Next, select "Configure Plotter" from the resulting menu.
  238.  
  239.    The currently active plotter type is then displayed on the screen, and
  240.    you are asked if you want to change it.  If the current plotter is not
  241.    "ADI plotter", answer Y and go on to select "ADI PLOTTER" from the
  242.    resulting menu.
  243.  
  244.    The remaining questions are simple one liners (for the most part), so
  245.    I'll just list the questions and answers.
  246.  
  247.    Output Format:  ASCII File
  248.  
  249.    Does the plotter have multiple pens?  Y
  250.    How many?  4 or 10 depending on the model
  251.  
  252.    Does the plotter support multiple dashed-line styles? Y
  253.    How many?  9
  254.  
  255.    Is the plotter variable speed?  Y
  256.    Code for highest speed:  36
  257.  
  258.    Specify units in millimeters? N
  259.  
  260.    Maximum horizontal (X) plot size in inches: 15.2
  261.    Plotter steps per inch in the horizontal (X) direction: 200
  262.  
  263.    Maximum vertical (Y) plot size in inches: 10.0
  264.    Plotter steps per inch in the horizontal (Y) direction: 200
  265.  
  266.    Would you like to calibrate your plotter? N
  267.  
  268.    Size units (Inches or Millimeters)? I
  269.  
  270.    Plot origin in Inches: 0.0,0.0
  271.  
  272.    Enter size or Width,Height (inches): MAX
  273.  
  274.    Rotate 2D plots 90 degrees clockwise? N
  275.  
  276.    Pen Width: 0.010
  277.  
  278.    Adjust area fill boundries for pen width? N
  279.  
  280.    Remove Hidden lines? N
  281.  
  282.    Specify Scale by entering:
  283.         plotted inches = Drawing Units or Fit? F
  284.  
  285.    At this point, you should return to the configuration menu.  Request an
  286.    exit to the Main Menu.  When asked if you want to keep configuration
  287.    changes, answer yes.
  288.  
  289.    To complete the configuration process, you must begin plotting a drawing.
  290.    After supplying the name of the drawing you want to plot, you will be
  291.    asked to specify the part of the drawing that you want to plot.  After
  292.    that, you will be presented with a list of the settings defined in the
  293.    configuration procedure, and will be asked if you want to change anything.
  294.    You should respond yes.
  295.  
  296.    After responding yes to the above question, a list of the current pen
  297.    settings for each color will be displayed.  Again, you will be asked if
  298.    you want to change any of the above settings.  You should probably
  299.    respond yes, because the default settings don't take advantage of the
  300.    multiple pen/line-type/speed settings that are available.
  301.  
  302.    If you respond yes, you will receive a set of prompts for each color that
  303.    has been defined to AutoCAD.  You will first be asked for the pen number
  304.    for that color, then the linetype, then the speed.
  305.  
  306.    For a list of available line types, see the Line Types section of this
  307.    document.  Typically, you will want to use line type 0 (solid line) for
  308.    all of the colors.
  309.  
  310.    The speed settings can be anything from 1 to 36.  I set these all to the
  311.    maximum, but it might be better for the plotter to set them somewhat
  312.    lower.
  313.  
  314.    For most users, there will be several entries that have a color number but
  315.    no color name.  Don't bother assigning values to these entries because
  316.    they will never be used.
  317.  
  318.    Once you have set the definitions for all of the colors, you can use the
  319.    X command to finish this section.  If you want to double check your work,
  320.    use S to show the current settings.
  321.  
  322.    You can hit return in response to all of the remaining questions, since
  323.    the only thing we really needed to change was the color/pen settings.  The
  324.    settings that you defined will remain in effect for future plots until
  325.    you change them.
  326.  
  327. ---------------------------------LINE TYPES----------------------------------
  328.              
  329.    As mentioned in the AutoCAD Setup section, it is possible to assign a
  330.    particular line type to any of the color definitions.  The line type
  331.    assigned will be used for all lines drawn in that color.  This is of
  332.    limited value, but might be useful for identifying a color when a pen
  333.    for that color is not actually available.  For example, you might assign
  334.    the color yellow to use the green pen, but to draw all lines in dashed
  335.    mode.  I don't actually recommend this.
  336.  
  337.    For information on assigning line types, see the AutoCAD Setup section
  338.    of this document.
  339.              
  340.    Currently supported line types are:
  341.  
  342.          (0)  ----------------------------------- (solid)
  343.          (1)  -- -- -- -- -- -- -- -- -- -- -- -- (dashed)
  344.          (2)  - - - - - - - - - - - - - - - - - - (hidden)
  345.          (3)  ---- - ---- - ---- - ---- - ---- -  (center)
  346.          (4)  ----- - - ----- - - ----- - - ----- (phantom)
  347.          (5)  ................................... (dot)
  348.          (6)  -- . -- . -- . -- . -- . -- . -- .  (dashdot)
  349.          (7)  -- -- . -- -- . -- -- . -- -- . --  (border)
  350.          (8)  -- .. -- .. -- .. -- .. -- .. -- .. (divide)
  351.  
  352.    Please note that, although the above line types are the same as those
  353.    defined in Release 10 of AutoCAD, they are not used to produce lines
  354.    drawn in a particular type in a drawing.  AutoCAD produces its line
  355.    types by raising and lowering the pen appropriately.
  356.  
  357.    If the program wass compiled with VARIABLE_DASHES defined, patterns in
  358.    the lines will be varied so that an integral number of patterns will be
  359.    included in each line segment.  If VARIABLE_DASHES was not defined, fixed
  360.    length patterns will be used without regard for the completeness of each
  361.    pattern. (ie short line segments may not include a complete pattern)
  362.  
  363.    In the precompiled distribution, VARIABLE_DASHES was not defined.
  364.  
  365.  
  366.  
  367. --------------------------ERROR AND WARNING MESSAGES-------------------------
  368.  
  369. Warning: input file not a version 1 ADI file.
  370.  
  371.   This warning is produced when a file appears to be an ADI file, but is not
  372.   labeled as a version 1 file.  ADI7221 will attempt to continue processing,
  373.   but may terminate later if other errors are encountered.
  374.   
  375.   AutoCAD versions 2 through 10 all produce version 1 ADI files.  If you are
  376.   using a version of AutoCAD within that range, this may indicate a bug in
  377.   the ADI7221 program.  If you are using a version of AutoCAD higher than
  378.   release 10, check the manuals to see if you can specify which version of
  379.   ADI it should use when creating ADI files.
  380.  
  381. Warning: PEN_CHANGE encountered but not supported.
  382.  
  383.   This warning message will only appear if ADI7221 has been compiled with
  384.   WARN_PENCHANGE defined.  The precompiled distribution was not compiled with
  385.   this option defined.
  386.  
  387.   ADI7221 does not support manual pen changes, because it is not a direct
  388.   feed to the plotter.  A manual pen change requires that output stop while
  389.   an operator manually changes pens.
  390.  
  391.   Don't confuse the manual PEN_CHANGE command with an automatic pen select.
  392.   ADI7221 will handle automatic pen selections correctly, formulating a
  393.   request for the plotter to automatically select a new pen from the
  394.   specified bay.
  395.  
  396.   ADI7221 will continue processing after this warning, but the currently
  397.   selected pen will remain in effect.
  398.  
  399. Fatal error: can't allocate input buffer
  400.  
  401.   There was not enough available memory to allocate the input buffer.  You
  402.   either have an extrememly low amount of memory, or you have too many things
  403.   open in a multitasking or task switching environment.
  404.   
  405.   Try closing some applications.
  406.  
  407. Fatal error: can't allocate output buffer
  408.  
  409.   This is virtually the same as the input buffer allocation message.
  410.  
  411. Fatal error: can't open input file for reading
  412.  
  413.   The input file either could not be found, or an I/O error occured when an
  414.   attempt was made to open the file.  
  415.   
  416.   Check the file name for correct spelling.  If the name is correct, try
  417.   running the MS-DOS CHKDSK command to see if there is a problem with the
  418.   disk.
  419.  
  420. Fatal error: can't open output file for writing
  421.  
  422.   One of three things can cause this error:  the output file couldn't be
  423.   created due to lack of disk space, the output file exists and has its
  424.   read-only bit set, or an I/O error occured when an attempt was made to
  425.   open/create the file.
  426.  
  427.   If the output file already exists, run the MS-DOS ATTRIB command to see if
  428.   the read-only bit is set.  If the file doesn't exist, check the amount of
  429.   free space on the disk, or try running the MS-DOS CHKDSK command to see if
  430.   there is a problem with the disk.
  431.  
  432. Fatal error: can't close input file
  433.  
  434.   This generally indicates a problem with the disk.
  435.  
  436.   Try running the MS-DOS CHKDSK command to identify the problem.
  437.  
  438. Fatal error: can't close output file
  439.  
  440.   This generally indicates a problem with the disk.
  441.  
  442.   Try running the MS-DOS CHKDSK command to identify the problem.
  443.  
  444. Fatal error: I/O error on input
  445.  
  446.   This generally indicates a problem with the disk.
  447.  
  448.   Try running the MS-DOS CHKDSK command to identify the problem.
  449.  
  450. Fatal error: I/O error on output
  451.  
  452.   This can be caused by either running out of space on the output disk, or
  453.   encountering a real media error.
  454.  
  455.   Check the available free space on the output disk.  7221 format files
  456.   typically use about 1/2 the space of the ADI input file.  If there seems
  457.   to be enough space for the output file, try running the MS-DOS CHKDSK
  458.   command to see if there is a problem with the disk.
  459.  
  460. Fatal error: input file not a valid ADI file
  461.  
  462.   Upon examining the input file, ADI7221 does not recognize it as an ADI
  463.   file.
  464.  
  465.   Recreate the input file via the plot function in AutoCAD.  Make sure that
  466.   AutoCAD has been configured to produce an ascii format ADI file.
  467.  
  468. Fatal error: Multiple BEGIN_PLOT commands found
  469.  
  470.   The input file was probably altered after it was created by AutoCAD.  The
  471.   most likely cause would be appending one ADI file to another, which is a
  472.   definite no no.
  473.  
  474.   Recreate the input file via the plot function in AutoCAD.
  475.  
  476. Fatal error: invalid MOVE command
  477.  
  478.   The ending location for the move was so far out of bounds that it exceeded
  479.   the 7221 parameter limits.
  480.  
  481.   Check the configuration in AutoCAD.  Make sure that the size of the
  482.   plotting area is the same as that specified in the AutoCAD Setup section of
  483.   this manual.
  484.  
  485. Fatal error: invalid DRAW command
  486.  
  487.   The ending location for the draw was so far out of bounds that it exceeded
  488.   the 7221 parameter limits.
  489.  
  490.   Check the configuration in AutoCAD.  Make sure that the size of the
  491.   plotting area is the same as that specified in the AutoCAD Setup section of
  492.   this manual.
  493.  
  494. Fatal error: invalid NEW_PEN command
  495.  
  496.   The requested pen number was so far out of bounds that it exceeded the 7221
  497.   parameter limits.
  498.  
  499.   Check the configuration in AutoCAD.  Make sure that the number of pens
  500.   defined is equal to the number of pens on the plotter (typically 4 or 10).
  501.  
  502. Fatal error: invalid SET_SPEED command
  503.  
  504.   The requested speed was out of the range defined in ADI7221.
  505.  
  506.   Check the configuration in AutoCAD.  Make sure that the highest speed
  507.   setting is within the limits specified in the AutoCAD Setup section of
  508.   this manual.
  509.  
  510. Fatal error: invalid LINE_TYPE command
  511.  
  512.   The requested line type was out of the range defined in ADI7221.
  513.  
  514.   Check the configuration in AutoCAD.  Make sure that the number of line
  515.   types is within the limits specified in the AutoCAD Setup section of
  516.   this manual.
  517.  
  518. Fatal error: input file contains ABORT_PLOT command
  519.  
  520.   The plot function in AutoCAD was interrupted during the creation of the
  521.   input file.
  522.  
  523.   Recreate the input file via the AutoCAD plot function.
  524.  
  525. Fatal error: unknown command encountered
  526.  
  527.   ADI7221 encountered a command that it cannot decode.  The input file either
  528.   is not an ADI file at all, or is not a version 1 ADI file.
  529.  
  530.   Try recreating the input file via the AutoCAD plot function.  AutoCAD
  531.   versions 2 through 10 all produce version 1 ADI files.  If you are using
  532.   a version of AutoCAD within that range, this may indicate a bug in the
  533.   ADI7221 program.  If you are using a version of AutoCAD higher than release
  534.   10, check the manuals to see if you can specify which version of ADI it
  535.   should use when creating ADI files.
  536.  
  537. Fatal error: no END_PLOT encountered
  538.  
  539.   ADI7221 has come to the end of the ADI file, but has not encountered an
  540.   END_PLOT command.  This may indicate that AutoCAD was interrupted while
  541.   creating the ADI file.
  542.  
  543.   Recreate the input file via the AutoCAD plot function.
  544.  
  545. ------------------------------------BUGS-------------------------------------
  546.  
  547.    Disk I/O errors are not all identified by type.  An error message caused
  548.    by running out of space is the same as one caused by a true media error.
  549.  
  550.    AutoCAD must be configured for the correct number of pens.  ADI7221 does
  551.    not check to ensure that a pen select request is within the range of
  552.    available pens.  This is due to the differing number of pens available
  553.    on 7221 series plotters.
  554.  
  555.    Due to the device independant nature of AutoCAD ADI files, none of the
  556.    advanced features of the 7221 plotter are used.  This tends to result in
  557.    large plot files, both for ADI format and for 7221 format.  This is
  558.    espcially true for drawings containing text, since the text is actually
  559.    drawn like a graphic figure.
  560.  
  561.    Error and Warning messages should probably have been given numbers so
  562.    they would be easier to find in this manual.  There are only about 20
  563.    possible errors, so it shouldn't be too big of a deal.
  564.